package main

import (
	"github.com/gin-gonic/gin"
	"net/http"
)

func main() {
	r := gin.Default()

	r.GET("/json", func(c *gin.Context) {

		//way1:
		data := map[string]interface{}{
			"name" : "xiaowangzi",
			"message":"hello world!",
			"age":18,
		}
		c.JSON(http.StatusOK, data)
	})

	r.Run(":9090")

}
